/**
 * Title :	jFamilyTree generator
 * Description: jFamilyTree generator
 * Version:	provider
 * Copyright (c) 2001-2008
 * Terms of use:see license agreement at http://treebolic.sourceforge.net/en/license.htm
 * Author: Bernard Bou
 * Company: bsys
 */
package jFamilyTree.dialogs.main;

import java.util.Properties;

import javax.swing.JDialog;
import javax.swing.UIManager;

import jFamilyTree.commons.Persist;
import jFamilyTree.commons.UrlDialog;

/**
 * URL dialog
 * 
 * @author Bernard Bou
 */
public class XUrlDialog extends UrlDialog
{
	private static final long serialVersionUID = 1L;

	/**
	 * Constructor
	 * 
	 * @param theseProperties
	 *        properties
	 */
	public XUrlDialog(Properties theseProperties)
	{
		super(theseProperties);
	}

	/**
	 * Main
	 * 
	 * @param theseArgs
	 *        arguments
	 */
	static public void main(String[] theseArgs)
	{
		UIManager.put("swing.boldMetal", false); //$NON-NLS-1$
		Properties theseSettings = Persist.getSettings("jFamilyTree-generator"); //$NON-NLS-1$
		XUrlDialog thisDialog = new XUrlDialog(theseSettings);
		thisDialog.setModal(true);
		thisDialog.setVisible(true);
		thisDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		if (thisDialog.ok)
		{
			System.out.println(theseSettings.getProperty("openurl")); //$NON-NLS-1$
			Persist.saveSettings("jFamilyTree-generator", theseSettings); //$NON-NLS-1$
		}
		System.exit(0);
	}
}
